package cn.antho.superhelp.feign;

import cn.antho.superhelp.fallback.UserServiceFallbackFactory;
import cn.antho.superhelp.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(
        contextId = "userService",
        value = "service-user",
        fallbackFactory = UserServiceFallbackFactory.class,
        path = "/user"
)
public interface UserService {

    @RequestMapping(value = "/{id}",method = RequestMethod.GET)
    JsonResult selectOne(@PathVariable("id")Long id);

}
